package com.qzsoft.zhjd.materiel.modules.materielstock.controller;

import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.jeemis.common.utils.Result;
import com.qzsoft.zhjd.common.utils.ResultUtils;
import com.qzsoft.zhjd.materiel.modules.materielstock.dto.MaterielStockListDto;
import com.qzsoft.zhjd.materiel.modules.materielstock.service.MaterielStockService;

/**
 * @ClassName MaterielDataController
 * @Description 材料收发存统计分析控制器
 * @author linhuawei
 * @since 2022-04-01
 */
@RestController
@RequestMapping("/api/materielStock")
public class MaterielStockController {

    @Autowired
    private MaterielStockService materielStockService;

    /**
     * @Title reciveAndSendCount
     * @Description 材料收发存分析
     * @param params 查询条件
     * @return 材料收发存分析
     */
    @RequiresPermissions("materiel:stock:page")
    @GetMapping("/page")
    public Result<IPage<MaterielStockListDto>> page(@RequestParam Map<String, Object> params) {
        IPage<MaterielStockListDto> data = materielStockService.pageDto(params);
        return ResultUtils.ok(data);
    }

}
